<template>
<div>
    <el-row class="tac">
        <el-col :span="12">
            <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :router="true">
                 <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==3">
                <el-menu-item index="/MinisterIndexView">
                    <i class="el-icon-menu"></i>
                    <span slot99O99IUII8="title">{{ findmenu.title }}</span>
                </el-menu-item>
                 </span></span></span>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==4">
                <el-menu-item index="/MinisterCalendarView">
                    <i class="el-icon-date"></i>
                    <span slot="title">{{ findmenu.title }}</span>
                </el-menu-item>
                 </span></span></span>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==5">
                <el-submenu index="1">
                    <template #title>
                        <i class="el-icon-location"></i>
                        <span>{{ findmenu.title }}</span>
                    </template>
                       <el-menu-item-group>
                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==8">
                            <el-menu-item index="/AcceptProjectView">{{ findmenu.title }}</el-menu-item>
                         </span></span></span>

                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==9">
                            <el-menu-item index="/MinisterTaskAssignView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==10">
                            <el-menu-item index="/AmendTaskView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==11">
                            <el-menu-item index="/Minister/Check">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==12">
                            <el-menu-item index="/TaskDetailView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==13">
                            <!-- 任务完成明细：已完成和未完成 -->
                            <el-menu-item index="/reflect">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

                          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==18">
                            <!-- 任务跟踪处理：任务完成的状态：完成 未完成 、、、 -->
                             <el-menu-item index="/SubmitProject">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

                             <el-menu-item index="/TestView">test</el-menu-item>
                       </el-menu-item-group>
                 </el-submenu>
                </span></span></span>
                    
                
                <el-submenu index="2">
                    <template #title>
                        <i class="el-icon-setting"></i>
                        <span>设置</span>
                    </template>
                    <el-menu-item-group>
                        <el-menu-item index="/ChangeInfoView">{{ findmenu.title }}</el-menu-item>
                        <el-menu-item index="/ministerLogout">{{ findmenu.title }}</el-menu-item>
                    </el-menu-item-group>
                </el-submenu>

                <el-submenu index="3">
                    <template #title>
                        <i class="el-icon-setting"></i>
                        <span>{{ findmenu.title }}</span>
                    </template>
                    <el-menu-item-group>
                        <el-menu-item index="/architecture">{{ findmenu.title }}</el-menu-item>
                    </el-menu-item-group>
                </el-submenu>
            </el-menu>
        </el-col>
    </el-row>

</div>
</template>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 199px;
    min-height: 600px;
    line-height: 50%;
}

.wm {
    height: 40px;
}
</style>

<script>
import instance from "@/utlis/request";

export default {
    name: 'MinisterMenu',
    data() {
        return {
            openeds: ['1'],
            isCollapse: true,
          findmenus:{},
        };
    },
  created:function (){
    this.initDate();
  },
  methods:{
    initDate:function (){
      instance.get("/Manage/UserMenus").then(res=>{
        this.findmenus=res.data.data
        console.log(res)
      })
    }
  }
}
</script>
